import { request } from "@/utils/request";

export function addChildren(data: Object) {
  return request({
    url: "api/sonCom/addSC.php",
    method: "POST",
    headers: {
      "Content-Type":"multipart/form-data"
    },
    data,
  });
}
export function getChildren() {
  return request({
    url: "api/sonCom/getAllSC.php",
    method: "GET",
  });
}

export function GetChildrenInfo(scId: any) {
  return request({
    url: `api/sonCom/getOneSC.php?scId=${scId}`,
    method: "GET",
  });
}
export function EditChildrenInfo(data: any,scId:any) {
  return request({
    url: `api/sonCom/updateSC.php?scId=${scId}`,
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    data,
  });
}
export function DelChildren(scId:any) {
  return request({
    url: `api/sonCom/delSC.php?scId=${scId}`,
    method: "GET",
  });
}
